package com.ma.huawei.a0420;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

/**
 * @ClassName A01
 * @Author: mayongqiang
 * @DATE 2022/4/22 21:20
 * @Description: 华为0420笔试题1
 */

/*
    25道题，（10*2 + 10*4 + 5*8） 按顺序做  累积错三道 退出
    问  给你分数  总共有多少种答题情况
 */
public class A01 {
    static Map<String, Integer> map = new HashMap<>();

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();

        int[] grades = new int[25];
        for (int i = 0; i < 10; i++) grades[i] = 2;
        for (int i = 10; i < 20; i++) grades[i] = 4;
        for (int i = 20; i < 25; i++) grades[i] = 8;
        System.out.println(dfs(0, N, 3, grades));
    }
    // idx  25~0  res N~0  count 3~0    dp[]
    // dp[25][N][3]  dp[i][0][3] = 1 dp[i][n][0]
    // 状态转移  dp[i][j][k] = dp[i-1][j][k-1] + dp[i-1][j-grad[i]][k];


    static int dfs(int idx, int rest, int count, int[] grades) {
        if (count == 0) return rest == 0 ? 1 : 0;
        if (rest == 0) return 1;
        if (idx >= grades.length) return 0;
        String key = idx + "-" + rest + "-" + count;
        if (map.containsKey(key)) {
            return map.get(key);
        }

        int result = dfs(idx + 1, rest, count - 1, grades)
                    + dfs(idx + 1, rest - grades[idx], count, grades);
        map.put(key, result);
        return result;
    }

}
